-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add checkVSCodePlugins webtools #7
base: master
Are you sure you want to change the base?
feat: add checkVSCodePlugins webtools #7
Conversation
description: `You are missing the following plugins: ${chalk.red( | ||
lackPlugins | ||
)}`, | ||
doctorLevel: "error", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doctorLevel 不能直接写死 需要给用户自定义 doctorLevel 的能力 直接 error 不可取
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Work 👍
vscode: { | ||
morePlugins: ( | ||
| string | ||
| { name: string; desc: string; version?: string } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里可以抽出来一个
type ExtraPlugin =
@@ -1,5 +1,6 @@ | |||
export default [ | |||
require.resolve("./checkNode"), | |||
require.resolve("./checkChrome"), | |||
require.resolve("./checkVSCodePlugins"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按照到类型放在一起比较合适一点
这样通过 api.addDoctorWebToolsCheckBefore
可以做类别区分
such as:
api.addDoctorWebToolsCheckBefore(()=>{
console.log('以下是对常用 VsCodePlugin 进行检测') // 当然 ui 可以随意diy
})
/** | ||
* Get local VSCode plugins | ||
*/ | ||
async function getLocalPlugins() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
提取 通用 utils 到 @dodctors/utils 这个包
export default (api: IApi) => { | ||
api.addDoctorWebToolsCheck(async () => { | ||
const vscodePlugins: VSCodePluginsConfig = [ | ||
...BASIC_VSCODE_PLUGINS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以写几个最通用的先
Auto Rename Tag
Chinese (Simplified) (简体中文) Language Pack for Visual Studi
. Code Spell Checker
Error Lens
Live Server
One Dark Pro
Prettier - Code formatter
description 按照功能随意发挥
新增webtools:checkVSCodePlugins
额外新增.doctor文件配置项字段:”vscodePlugins“